package com.chuanyang.driverh.mainmy;


import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.chuanyang.driverh.BaseApplication;
import com.chuanyang.driverh.R;
import com.chuanyang.driverh.base.BaseTitleActivity;
import com.chuanyang.driverh.responseresult.DriverInfoData;
import com.chuanyang.driverh.utils.ActivityUtil;

/**
 * 我的车队
 * Created by eason on 2016/7/21.
 */
public class MyCarTeamActivity extends BaseTitleActivity {
    private DriverInfoData driverinfo;
    private LinearLayout ll_createteam;
    private LinearLayout ll_jointeam;

    @Override
    protected int getContentResId() {
        return R.layout.my_act_mycarteam;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
       ll_createteam = (LinearLayout) findViewById(R.id.ll_act_mycarshipteam_createteam);
       ll_jointeam = (LinearLayout) findViewById(R.id.ll_act_mycarshipteam_jointeam);
    }

    @Override
    protected void initData() {
        setBackImg();
        getTitleTextView().setText("我的车/船队");
        driverinfo = BaseApplication.getInstance().getDriverInfo();

    }

    @Override
    protected void initListener() {
        ll_createteam.setOnClickListener(this);
        ll_jointeam.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()) {
            case R.id.ll_act_mycarshipteam_createteam:
                ActivityUtil.startActivity(activityContext,EditCarTeamActivity.class);
                finish();
                break;
            case R.id.ll_act_mycarshipteam_jointeam:
                ActivityUtil.startActivity(activityContext,AddCarTeamActivity.class);
                finish();
                break;
        }
    }
}
